In the absence of icon themes (such as in a freshly
created toolbox container), we should not just fall back
to "no cursor", since that makes it hard even to close
the application. Fall back to an included default cursor
of last resort.
int *height,
int *scale)
{
+ GdkTexture *texture;
+
if (gdk_cursor_get_name (cursor))
{
struct wl_cursor *c;
}
else
{
- GdkTexture *texture = gdk_cursor_get_texture (cursor);
cairo_surface_t *surface;
struct wl_buffer *buffer;
+ texture = gdk_cursor_get_texture (cursor);
+
+from_texture:
surface = g_hash_table_lookup (display->cursor_surface_cache, cursor);
if (surface == NULL)
{
hotspot_x, hotspot_y,
width, height,
scale);
+ else
+ {
+ texture = gdk_texture_new_from_resource ("/org/gtk/libgdk/cursor/default");
+ goto from_texture;
+ }
none:
*hotspot_x = 0;